package com.jokelandave.poc.server.restlet;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.Server;
import org.restlet.data.Protocol;
import org.restlet.routing.Router;

import com.googlecode.objectify.ObjectifyService;
import com.jokelandave.poc.server.dao.SPBDao;

public class SPBetsApplication extends Application {

	public static void main(String[] args) throws Exception
	{
		Server server = new Server(Protocol.HTTP);
		server.setNext(new SPBetsApplication());
		server.start();
	}
	
	public SPBetsApplication()
	{
		setName("SPBets Restlet Server");
		setDescription("a restlet server for test");
		setOwner("Nicker");
		setAuthor("Nicker");
		
	}
	
	public Restlet createInboundRoot()
	{
		RequestInfo reqInfo = new RequestInfo();
		
		Router router = new Router();
		
		router.attach("/RequestInfo", reqInfo);
//		router.attach("/Bet", betRestlet);
//		router.attach("/Profile", profileRestlet);
//		router.attach("/SportEvent", sportEventRestlet);
		router.attach("/Team", TeamServerResource.class);
		
		return router;
	}
}
